<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
<title>Rain CSS > Select</title>
<!-- Framework CSS -->
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print" /> 
<!--[if lte IE 8]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<link rel="stylesheet" href="css/rain.css" type="text/css" media="all" />
<!--[if lt IE 9]><script type="text/javascript" src="js/html5.js"></script><![endif]-->
<style>
.footer{bottom:0;}
</style>
</head>
<body class="body posr" id="body">
	<div class="header headerBlue">
  	<nav class="lsn posr clearfix">
    	<a href="http://www.webdevelopmentmachine.com" class="headerLink headerLinkBlue l pr pl ib tdn">首页home</a>
    	<a href="http://www.webdevelopmentmachine.com/blog" class="headerLink headerLinkBlue l pr pl ib tdn">博客blog</a>
    	<a href="http://www.webdevelopmentmachine.com/demo/game.html" class="headerLink headerLinkBlue l pr pl ib tdn">游戏game</a>
    </nav>
	</div>
	<div class="headerM headerGrey">
		<div class="container posr">
			<div class="l">
				<a class="tdn block ptll fsxxl" href="index.html">Rain CSS</a>
			</div>
		</div>
	</div>

	<div class="container mt posr">
		<div class="content">
			<div class="sidebar l posr">
				<h2 class="category">Select component</h2>
				<p>This part is the webpage Select component</p>
			</div>
			<div class="main mainRight posr">
				<h1>Select</h1>
				<div id="j_select"></div><br/>
				<div id="j_select_1"></div>
          <p>HTML (the Hypertext Markup Language) and CSS  (Cascading Style Sheets) are two of the core technologies 
          for building Web pages. HTML provides the structure of the page, CSS the (visual and aural) layout, for a 
          variety of devices. Along with graphics and scripting, HTML and CSS are the basis of building Web pages and 
          Web Applications. Learn more below about:</p>
					<h2>What is HTML?</h2>

					<p>HTML is the language for describing the structure of Web pages. HTML gives authors the means to:</p>
					<ul>
    				<li>Publish online documents with headings, text, tables, lists, photos, etc.</li>
            <li>Retrieve online information via hypertext links, at the click of a button.</li>
            <li>Design forms for conducting transactions with remote services, for use in searching for information, 
            making reservations, ordering products, etc.</li>
            <li>Include spread-sheets, video clips, sound clips, and other applications directly in their documents.</li>
					</ul>
					<p>With HTML, authors describe the structure of pages using markup. The elements of the language label pieces of 
          content such as "paragraph," "list," "table," and so on.</p>
					<h2>What is XHTML?</h2>

          <p>XHTML is a variant of HTML that uses the syntax of XML, the Extensible Markup Language. XHTML has all the same 
          elements (for paragraphs, etc.) as the HTML variant, but the syntax is slightly different. Because XHTML is an 
          XML application, you can use other XML tools with it (such as XSLT, a language for transforming XML content).</p>

					<h2>What is CSS?</h2>

					<p>CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts. It allows 
          to adapt the presentation to different types of devices, such as large screens, small screens, or printers. CSS is 
          independent of HTML and can be used with any XML-based markup language. The separation of HTML from CSS makes it 
          easier to maintain sites, share style sheets across pages, and tailor pages to different environments. This is 
          referred to as the separation of structure (or: content) from presentation.</p>

					<h2>Examples</h2>

					<p>The following very simple example of a portion of an HTML document illustrates how to create a link within a paragraph. 
          When rendered on the screen (or by a speech synthesizer), the link text will be "final report"; when somebody activates the 
          link, the browser will retrieve the resource identified by "http://www.example.com/report":</p>
 
					<p>The class attribute on the paragraph's start tag ("&lt;p&gt;") can be used, among other thing, to add style. For instance, to 
          italicize the text of all paragraphs with a class of "moreinfo," one could write, in CSS:</p>

					<p>p.moreinfo { font-style: italic }</p>

					<p>By placing that rule in a separate file, the style may be shared by any number of HTML documents.</p> 
			</div>
		</div>
	</div>
    <footer class="footer socialFooter c borderTop">
      <p class="ps">Maintained by the <a href="https://github.com/rainzhai" class="blue">RainZhai</a>.</p>
      <p class="ps">Code licensed under <a rel="license" class="blue" href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a rel="license"  class="blue" href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.</p> 
    </footer>  
<!-- script src="js/lib/require.js" data-main="js/selectmain"></script -->
<script type="text/javascript" src="http://cdn.staticfile.org/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/jquery.dialog.js"></script>
<script type="text/javascript" src="js/jquery.select.js"></script>
<script type="text/javascript"> 
  var s = new selects({
    event : 'click',
    selectHandler: '#j_select',
    selectClass:'ui-select ggrey btn greybtn round-10 posr oh',
    data: {list:[{ "name": "1", "value":"1" },{ "name": "2", "value":"2" }
    ]},
    dataUrl:'./data/select.json',
    iconwrapStyle:{"top":"15px","right":"5px"},
    callback: function (e) {
      d.close(e,function(){
          history.back();
      });
      s.checkReload();
      //s.divData(5);
  }
  });
  var s1 = new selects({
    event : 'click',
    selectHandler: '#j_select_1',
    selectClass:'ui-select ggrey btn greybtn round-10 posr oh',
    next: null,
    data: {list:[{ "name": "1", "value":"1" },{ "name": "2", "value":"2" }]},
    dataUrl:'./data/select.json',
    iconwrapStyle:{"top":"15px","right":"5px"}
  });

  var d =new dialog({
    top : '5%',
    titleText : "Select dialog",
    content: s.getUlobj(),
    contentStyle:{
      "height": $( window ).height()*0.65,
      "overflow": "auto"
    },
    btnsWrapStyle : {'text-align' : 'center'},
    buttonsClass : ["hm rounds ggrey btn greybtn ib wf-45", "hm rounds ggrey btn greybtn ml ib wf-45"],
    buttonsArray : ['cancel','ok'],
    beforeShow: function () {
        var t = util.getTitle();
        if (!util.state()) {
            util.pushState({data: {name: 'show', obj: 'd'}, title: t, url: '?show'});
        } else {
            util.replaceState({data: {name: 'show', obj: 'd'}, title: t, url: '?show'});
        }
    },
    buttonsCallback : {'ok':function(){
      var v = d.getHtml().find('.c_ul').find('[state=s]').attr('val');
      var t = d.getHtml().find('.c_ul').find('[state=s]').attr('text');
      s.setValue(v).setText(t).remark();
      var n = s.getNext();
      if(n){
        n.setParams({'name':t,'value':v});
        n.setData();
      }
      history.back();
      d.close();
    },'cancel':function(){
      history.back();
      d.close();
    }}
  });
  var d1 =new dialog({
    top : '5%',
    titleText : "Select dialog",
    content: s1.getUlobj(),
    contentStyle:{
      "height": $( window ).height()*0.65,
      "overflow": "auto"
    },
    btnsWrapStyle : {'text-align' : 'center'},
    buttonsClass : ["hm rounds ggrey btn greybtn ib wf-45", "hm rounds ggrey btn greybtn ml ib wf-45"],
    buttonsArray : ['cancel','ok'],
    beforeShow:function(e){
      var t = util.getTitle();
      if(!util.state()){
        util.pushState({data:{name:'show2'},title:t,url:'?show2'});
        }else{
        util.replaceState({data:{name:'show2'},title:t,url:'?show2'});
      }
    },
    buttonsCallback : {'ok':function(){
      var v = d1.getHtml().find('.c_ul').find('[state=s]').attr('val');
      var t = d1.getHtml().find('.c_ul').find('[state=s]').attr('text');
      s1.setValue(v).setText(t).remark();
      d1.close();
    },'cancel':function(){
      d1.close();
    }}
  });
  s.setNext(s1);
  s.setDialog(d);
  s1.setDialog(d1);
  util.registerStateChange(function () {
    if (!util.state() && d) {
        d.close();
    } else {
        d._show();
      }
  });
  util.initObjByUrl(d);

</script>
</body>
</html>